from django.conf.urls import url
from myadmin.views import member,index,shop,category,product

urlpatterns = [
    # 后台首页
    url(r'^$', index.index, name="myadmin_index"),

    # 会员管理路由
    url(r'^member/(?P<pIndex>[\-0-9]+)$', member.index, name="myadmin_member_index"),   #会员列表
    url(r'^member/edit/(?P<uid>[\-0-9]+)$', member.edit, name="myadmin_member_edit"),   #会员状态修改
    url(r'^member/update/(?P<uid>[\-0-9]+)$', member.update, name="myadmin_member_update"),   #会员状态保存

    # 店铺管理路由
    url(r'^shop/(?P<pIndex>[\-0-9]+)$', shop.index, name="myadmin_shop_index"),         #店铺首页
    url(r'^shop/add$', shop.add, name="myadmin_shop_add"),                              #店铺添加
    url(r'^shop/insert$', shop.insert, name="myadmin_shop_insert"),                     #保存店铺
    url(r'^shop/edit/(?P<sid>[0-9]+)$', shop.edit, name="myadmin_shop_edit"),           #修改店铺状态
    url(r'^shop/update/(?P<tid>[0-9]+)$', shop.update, name="myadmin_shop_update"),     #保存店铺状态

    # 菜单类别管理路由
    url(r'^category/(?P<pIndex>[\-0-9]+)$', category.index, name="myadmin_category_index"),         #菜单类别首页
    url(r'^category/add$', category.add, name="myadmin_category_add"),                              #菜单类别添加
    url(r'^category/insert$', category.insert, name="myadmin_category_insert"),                     #保存菜单类别
    url(r'^category/edit/(?P<cid>[0-9]+)$', category.edit, name="myadmin_category_edit"),           #修改菜单类别信息
    url(r'^category/del/(?P<cid>[0-9]+)$', category.delete, name="myadmin_category_del"),           #修改菜单类别状态
    url(r'^category/update/(?P<cid>[0-9]+)$', category.update, name="myadmin_category_update"),     #保存菜单类别状态
    url(r'^category/updates/(?P<cid>[0-9]+)$', category.updates, name="myadmin_category_updates"),  # 保存菜单类别状态

    # 菜品管理路由
    #url(r'^product/(?P<pIndex>[\-0-9]+)$', product.index, name="myadmin_product_index"),         #菜品信息首页
    #url(r'^product/add$', product.add, name="myadmin_product_add"),                              #菜品信息添加
    #url(r'^product/insert$', product.insert, name="myadmin_product_insert"),                     #保存菜品信息
    #url(r'^product/edit/(?P<cid>[0-9]+)$', product.edit, name="myadmin_product_edit"),           #修改菜品信息信息
    #url(r'^product/del/(?P<cid>[0-9]+)$', product.delete, name="myadmin_product_del"),           #修改菜品信息状态
    #url(r'^product/update/(?P<cid>[0-9]+)$', product.update, name="myadmin_product_update"),     #保存菜品信息状态
    #url(r'^product/updates/(?P<cid>[0-9]+)$', product.updates, name="myadmin_product_updates"),  # 保存菜品信息状态
#
    url(r'^verify$', index.verify, name="myadmin_verify"), #验证码
]